/**
 * 
 */
package com.wsj.web.action.test;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 * @author super
 *
 */
public class ToPageAction extends Action{
	
	/**
	 * 
	 */
		public ActionForward execute(
			ActionMapping mapping,
			ActionForm form,
			HttpServletRequest request,
			HttpServletResponse response) {
//		
//			try {
//				response.getWriter().write("<script language=\"javascript\"> alert(\"ok\");</script>");
//			} catch (IOException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
			
			request.setAttribute("popMsg", "<script language=\"javascript\"> alert(\"ok\");</script>");
			return mapping.findForward("success");
	 }

}
